
test-convert.o:     file format elf64-littleaarch64


Disassembly of section .text:

0000000000000000 <main>:
    char type;  
    int age;  
};  
  
int main()  
{  
   0:	a9bd7bfd 	stp	x29, x30, [sp, #-48]!
   4:	910003fd 	mov	x29, sp
    struct A a;  
    a.num=1;  
   8:	52800020 	mov	w0, #0x1                   	// #1
   c:	b90013a0 	str	w0, [x29, #16]
  
    char* tmp1=(char *)(&(a.num)); 
  10:	910043a0 	add	x0, x29, #0x10
  14:	f90017a0 	str	x0, [x29, #40]
	
	printf("%d\n", *tmp1);	// 1
  18:	f94017a0 	ldr	x0, [x29, #40]
  1c:	39400000 	ldrb	w0, [x0]
  20:	2a0003e1 	mov	w1, w0
  24:	90000000 	adrp	x0, 0 <main>
  28:	91000000 	add	x0, x0, #0x0
  2c:	94000000 	bl	0 <printf>

    tmp1=tmp1+4;  
  30:	f94017a0 	ldr	x0, [x29, #40]
  34:	91001000 	add	x0, x0, #0x4
  38:	f90017a0 	str	x0, [x29, #40]

	printf("%d\n", *tmp1);	// -128
  3c:	f94017a0 	ldr	x0, [x29, #40]
  40:	39400000 	ldrb	w0, [x0]
  44:	2a0003e1 	mov	w1, w0
  48:	90000000 	adrp	x0, 0 <main>
  4c:	91000000 	add	x0, x0, #0x0
  50:	94000000 	bl	0 <printf>

    *tmp1='a';  
  54:	f94017a0 	ldr	x0, [x29, #40]
  58:	52800c21 	mov	w1, #0x61                  	// #97
  5c:	39000001 	strb	w1, [x0]

    int *tmp2=(int *)(&(a.num));  
  60:	910043a0 	add	x0, x29, #0x10
  64:	f90013a0 	str	x0, [x29, #32]

    tmp2=tmp2+2;  
  68:	f94013a0 	ldr	x0, [x29, #32]
  6c:	91002000 	add	x0, x0, #0x8
  70:	f90013a0 	str	x0, [x29, #32]

    *tmp2=100;  
  74:	f94013a0 	ldr	x0, [x29, #32]
  78:	52800c81 	mov	w1, #0x64                  	// #100
  7c:	b9000001 	str	w1, [x0]
  
    struct B *b=(struct B *)(&a);  
  80:	910043a0 	add	x0, x29, #0x10
  84:	f9000fa0 	str	x0, [x29, #24]
  
    printf(" b->num=%d  b->type=%c  b->age=%d \n",b->num,b->type,b->age);	
  88:	f9400fa0 	ldr	x0, [x29, #24]
  8c:	b9400001 	ldr	w1, [x0]
  90:	f9400fa0 	ldr	x0, [x29, #24]
  94:	39401000 	ldrb	w0, [x0, #4]
  98:	2a0003e4 	mov	w4, w0
  9c:	f9400fa0 	ldr	x0, [x29, #24]
  a0:	b9400802 	ldr	w2, [x0, #8]
  a4:	90000000 	adrp	x0, 0 <main>
  a8:	91000000 	add	x0, x0, #0x0
  ac:	2a0203e3 	mov	w3, w2
  b0:	2a0403e2 	mov	w2, w4
  b4:	94000000 	bl	0 <printf>
  b8:	52800000 	mov	w0, #0x0                   	// #0
	// output:
	// b->num=1  b->type=P  b->age=100
}  
  bc:	a8c37bfd 	ldp	x29, x30, [sp], #48
  c0:	d65f03c0 	ret
